package com.qg.controller;

import com.qg.dto.ReturnResult;
import com.qg.dto.ReturnResultUtils;
import com.qg.pojo.QgGoods;
import com.qg.service.LocalGoodsService;
import com.qg.service.QgGoodsService;
import com.qg.vo.GoodsVo;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class GoodsController {
    @Resource
    private LocalGoodsService localGoodsService;

    @GetMapping("/api/v/queryGoodsById")
    public ReturnResult queryGoodsById(String id) throws Exception {
        return ReturnResultUtils.returnSuccess(localGoodsService.getGoodVoById(id));
    }
}
